home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news.inap.net!news1!ind-008-237-73
- From: dlmiller@iquest.net (Doug Miller)
- Subject: Re: Why does my program do this?
- X-Nntp-Posting-Host: ind-008-237-73.iquest.net
- Message-ID: <Dp9A9p.K60@iquest.net>
- Sender: news@iquest.net (News Admin)
- Organization: IQuest Network Services
- X-Newsreader: News Xpress Version 1.0 Beta #2.1
- References: <4jnln2$95j@dfw-ixnews3.ix.netcom.com> <4jpe4s$db2@penage.cs.laurentian.ca>
- Date: Tue, 2 Apr 1996 22:27:26 GMT
-
- echan@nickel.laurentian.ca (Edward C. Chan) wrote:
- >>char scores[STUDENT][5];
- >>
- >> for (i=0; i <= students-1; i=i+1)
- >> {
- >> for (j=0; j <= tests-1; j=j+1)
- >> {
- >> gets(&scores[i][j]);
- >> }
- >> }
- >>
- >
- >user error.
- >
- >replace
- >
- > gets(&scores[i][j]);
- >
- >with
- >
- > gets(scores[i][j]);
- >
- >andeverything shall work fine.
-
- I would be surprised if that is the case. Consider the definition of scores...
-
- Actually, you are lucky that the programme
- >doesn't crash on you.
-
- Agreed.
-
-